{extend name="public/base" /}
{block name="style"}<link href="__LIB__/fileinput/css/fileinput.min.css" rel="stylesheet" /> {/block}
 {block name="body"}
<div class="content-tabs">
	<ol class="breadcrumb">
		<li>
			<a href="{:url('index/index')}"><i class="fa fa-home"></i></a>
		</li>
		<li><strong>短信群发</strong></li>
	</ol>
</div>
<div class="ibox-content">
	<form id="myForm" class="form-horizontal m-t" method="post" action="{:url('index')}">
	<div>
		<label  style="padding-left: 25px;">剩余短信：{$smscount}条</label>
	</div>
	<div id="gd_box" class="ibox-content" style="width:25%;height:500px;float: left;margin-top: 20px;margin-left: 20px;">
		<p class="deit-title">
			<i>1</i><span>选择发送对象</span>
		</p>
		<div class="input-group col-sm-8" id="ff">
			<textarea id="mobile" name="mobile" rows="5" style="width: 300px;height: 400px;" placeholder="填写或粘贴手机号，多个手机号时换行"></textarea>		
		</div>
		<a href="javascript:open_mem()" class="btn btn-primary btn-outline">增加发送对象</a>
		<span in="num"></span>
	</div>
	<div id="pk_box" class="ibox-content" style="width:63%;height:500px;display:inline-block;margin-top: 20px;margin-left: 20px;">
		<p class="deit-title">
			<i>2</i><span>填写短信内容</span>
		</p>
		<div class="input-group col-sm-8">
			<textarea id="content" name="content" rows="5" style="width: 700px;height: 200px;" onclick="check()"  placeholder="，退订回T【龙信云商铺】">，退订回T【龙信云商铺】</textarea>
			<div class="s-height width-p-100 padding-20-0 border-none" data-s-height="true" style="height: 218px;padding-top: 30px;">
				<p class=" fc-blue-font">
					<i class="fa fa-exclamation-circle"></i>说明
				</p>
				<p class="fc-text-font">
					1）手机号重复时只会发送一次，格式错误的手机号不会发送；
					<br> 2）短信数量计算规则：不超过70字时，每发送给一个手机号将从剩余短信中扣减1条，超过70字时，短信内容字数/67后向上取整。例如，71个字将扣减2条，135个字将扣减3条；
					<br> 3）根据短信服务商的要求，所有营销类短信结尾必须加“退订回T【龙信云商铺】”；
					<br> 4）短信中出现多个【】时，大部分手机号无法接收，因此，出现多个该符号时将无法发送；
					<br> 5）发送对象每次最多1W个，超出的手机号将会被丢弃；
				</p>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="col-sm-4 col-sm-offset-10">
			<input type="hidden" id="num" name="num"/>
			<button class="btn btn-primary" type="submit"><i class="fa fa-paste"></i> 发送</button>&nbsp;&nbsp;
			<a onclick="qingk()" class="btn btn-danger"><i class="fa fa-trash-o"></i> 清空 </a>
		</div>
	</div>
	</form>
</div>
{/block} {block name="script"}
<script src="__JS__/jquery.form.js"></script>
<script src="__LIB__/validate/jquery.validate.min.js"></script>
<script src="__LIB__/validate/messages_zh.min.js"></script>
<script src="__LIB__/validate/add_validate.min.js"></script>
<script src="__LIB__/fileinput/js/fileinput.min.js"></script>
<script src="__LIB__/fileinput/js/locales/zh.js"></script>
<script>
	function open_mem(){
		layer.open({
		type: 2,
		title: '选择会员',
		area: ['80%', '85%'],
		scrollbar: false,
		content: ['/web/sms_mass/members','no']
		});
	}
	$(function() {
		$("#myForm").validate({
			rules: {
				mobile: "required"
			},
			messages: {
				mobile: ICON.error + "请输入发送对象",
			},
			submitHandler: function(form) {
				ajaxForm();
			}
		});
	});
</script>
<script>
	//清空
	function qingk(){
		$("#mobile").val('');
		$("#content").val('');		
	}
</script>
{/block}